#pragma once

#include "Types.h"
#include "RefCount.h"

class  CActorValue : public TRefCount<CActorValue>
{
public:
	CActorValue(char *v) { 
		this->mName = strdup(v);
	}
	~CActorValue(void) { 
		free(this->mName);
	}

	void setName(char *name) {
		if(this->mName)
			free(this->mName);

		this->mName = strdup(name);
	}

	// basic functionality
	void set(void * value) {
		this->mValue = value;
	}
	void * get(void) {
		return this->mValue;
	}


	// Operator overloads
	bool operator ==(void * val) { 
		if(mValue == val)
			return true;
		else
			return false;
	}
	bool operator =(void * val) { 
		this->mValue = val;
	}


private:
	void * mValue;
	char *mName;
};
